﻿using System;
using System.Collections.Generic;

namespace PowerGui.AddOn.Interfaces
{
    /// <summary>
    /// The <see cref="IPowerGui"/> interface is the entry point
    /// for accessing the PowerGUI components. 
    /// </summary>
    public interface IPowerGui
    {
        /// <summary>
        /// Returns whether PowerGUI is installed on the machine.
        /// </summary>
        bool Installed { get; }
        /// <summary>
        /// Returns the installation path to PowerGUI. This value is an empty
        /// string if PowerGUI is not installed.
        /// </summary>
        string InstallPath { get; }
        /// <summary>
        /// Initializes this class.  There is no need to call this yourself.
        /// </summary>
        void Initialize();
        /// <summary>
        /// Returns the PowerGUI PowerShell console instance.
        /// </summary>
        Lazy<IConsole> Console { get; }
        /// <summary>
        /// Creates a new empty <see cref="IScriptEditor"/>
        /// </summary>
        /// <returns></returns>
        IScriptEditor CreateEditorInstance();
        /// <summary>
        /// Creates a new <see cref="IScriptEditor"/> with the specified
        /// file loaded into it.
        /// </summary>
        /// <param name="fileName">The file name of the script to load.</param>
        /// <returns></returns>
        IScriptEditor CreateEditorInstance(string fileName);
        /// <summary>
        /// Returns the <see cref="IDebugger"/>.
        /// </summary>
        IDebugger Debugger { get; }
        /// <summary>
        /// Returns a collection of <see cref="IScriptEditor"/>s that are currently
        /// being managed by the API.
        /// </summary>
        IEnumerable<IScriptEditor> Editors { get; }
    }
}
